#include "platinum.h"
#include "dungeon.h"
//#include "room.h"

void Dungeon::ProcessTick()
{
   Platinum::Thread::Mutex mutex;
   for(unsigned int RoomIt = 0; RoomIt < RoomList.size(); RoomIt++)
   {
        mutex.Lock();
        RoomList.at(RoomIt)->ProcessTick();
        mutex.Unlock();
   }
   Platinum::Thread::Yield();
}

void Dungeon::GlobalChat(std::string msg)
{
   Platinum::Thread::Mutex mutex;
   for(unsigned int RoomIt = 0; RoomIt < RoomList.size(); RoomIt++)
   {
        mutex.Lock();
        RoomList.at(RoomIt)->AddChat(msg);
        mutex.Unlock();
   }
}
